package com.fulu.game.bi.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum LabelStatusEnum implements TypeEnum<Byte> {
    INVALID((byte)1, "未生效"),
    VALID((byte)2, "已生效"),
    EXPIRE((byte)3, "已结束");

    private Byte type;
    private String msg;

    @Override
    public TypeEnum<Byte> parse(Byte type) {
        for (LabelStatusEnum e : LabelStatusEnum.values()) {
            if (Objects.equals(e.getType(), type)) {
                return e;
            }
        }
        return null;
    }
}
